<?php //

namespace Proj\ResManBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * TaskResources
 *
 * @ORM\Table(name="task_resources")
 * @ORM\Entity
 */
class TaskResources {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var Task
     * 
     * @ORM\ManyToOne(targetEntity="Task", inversedBy="taskResources")
     * @ORM\JoinColumn(name="task_id", referencedColumnName="id")
     **/
    private $task;
    
    /**
     * @var Resources
     * 
     * @ORM\ManyToOne(targetEntity="Resources", inversedBy="taskResources")
     * @ORM\JoinColumn(name="resources_id", referencedColumnName="id")
     **/
    private $resources;

    /**
     * @var integer
     *
     * @ORM\Column(name="amount", type="integer", nullable=true)
     */
    private $amount;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set startDate
     *
     * @param \DateTime $startDate
     * @return TaskResources
     */
    public function setStartDate($startDate)
    {
        $this->startDate = $startDate;

        return $this;
    }

    /**
     * Get startDate
     *
     * @return \DateTime 
     */
    public function getStartDate()
    {
        return $this->startDate;
    }

    /**
     * Set endDate
     *
     * @param \DateTime $endDate
     * @return TaskResources
     */
    public function setEndDate($endDate)
    {
        $this->endDate = $endDate;

        return $this;
    }

    /**
     * Get endDate
     *
     * @return \DateTime 
     */
    public function getEndDate()
    {
        return $this->endDate;
    }

    /**
     * Set task
     *
     * @param \Proj\ResManBundle\Entity\Task $task
     * @return TaskResources
     */
    public function setTask(\Proj\ResManBundle\Entity\Task $task = null)
    {
        $this->task = $task;

        return $this;
    }

    /**
     * Get task
     *
     * @return \Proj\ResManBundle\Entity\Task 
     */
    public function getTask()
    {
        return $this->task;
    }

    /**
     * Set resources
     *
     * @param \Proj\ResManBundle\Entity\Resources $resources
     * @return TaskResources
     */
    public function setResources(\Proj\ResManBundle\Entity\Resources $resources = null)
    {
        $this->resources = $resources;

        return $this;
    }

    /**
     * Get resources
     *
     * @return \Proj\ResManBundle\Entity\Resources 
     */
    public function getResources()
    {
        return $this->resources;
    }

    /**
     * Set amount
     *
     * @param integer $amount
     * @return TaskResources
     */
    public function setAmount($amount)
    {
        $this->amount = $amount;

        return $this;
    }

    /**
     * Get amount
     *
     * @return integer 
     */
    public function getAmount()
    {
        return $this->amount;
    }
}
